#ifndef QCVIMAGEWIDGET_H
#define QCVIMAGEWIDGET_H

#include <QWidget>
#include <QImage>
#include <QPainter>
#include <opencv2/opencv.hpp>

class QCVImageWidget : public QWidget
{
    Q_OBJECT
public:
    explicit QCVImageWidget(QWidget *parent = 0);
    QSize sizeHint() const;
    QSize minimumSizeHint() const;
    void showImage(const cv::Mat& image);
    void paintEvent(QPaintEvent* /*event*/);

private:
    QImage _qimage;
    cv::Mat _tmp;

};

#endif // QCVIMAGEWIDGET_H
